public class ServiceB extends AbstractService {

    public ServiceB(AbstractMediator mediator) {
        super(mediator);
    }

    public void doSomething() {
        System.out.println("I'm Service B");
    }

    public void callA() {
        this.doSomething();
        System.out.println("调用Service A");
        mediator.callServiceA();
    }
}